#ifndef TD_MENU_PANEL_H_
#define TD_MENU_PANEL_H_

/************************************************************************/
/* Core                                                                 */
/************************************************************************/
#include "Core/Utils.h"

/************************************************************************/
/* GUI                                                                  */
/************************************************************************/
#include "GUI/Panels/BasePanel.h"

/************************************************************************/
/* Resources                                                            */
/************************************************************************/
#include "Resources/Tiles/Tile.h"
#include "Resources/ResourceManager.h"

using namespace std;
using namespace boost;

namespace TD_GUI {

	class MenuPanel : public BasePanel {

		/************************************************************************/
		/* Default definitions                                                  */
		/************************************************************************/
		static const string m_menuPanelBackground;
		static const string m_menuPanelBackground2;
		static const Coord2D m_menuPanelPosition;
		static const Coord2D m_menuPanelSize;
		
		//Main menu image
		shared_ptr<SDLImage> m_pMainImg;
		
		//Auxiliary image used in the auxliary menu
		shared_ptr<SDLImage> m_pAuxiliaryImg;
		
		//Tile of the question mark icon
		Tile *m_pQuestionMarkIcon;

		//Index of the user choice (could vary from 0 to 3);
		unsigned char m_questionIndex;

		//User's interaction of choice ;)
		interaction_t m_interaction;
		
		//Are you sure Menu
		bool m_auxiliaryMenu;

		//SGFX
		shared_ptr<SDLSound> m_pFireSound;
		
		void moveIconDown(unsigned int i);
		void moveIconUp(unsigned int i);
		void setAuxiliaryMenu(bool enable);
	public:


		/************************************************************************/
		/* ctors and dtors					                                    */
		/************************************************************************/
		//Default constructor
		explicit MenuPanel();

		//Copy constructor
		explicit MenuPanel(const MenuPanel &rhs);

		//Assignment constructor
		MenuPanel& operator=(const MenuPanel &rhs);

		//Destructor
		~MenuPanel();

		/************************************************************************/
		/* Rendering                                                            */
		/************************************************************************/
		void render(SDL_Surface *const g_destSurface, unsigned int deltaTime);

		interaction_t processEvent(const SDL_Event &event);

	};
}


#endif